Skip to content

Endpoint to get a summary of runs for a given workflow instance#199

Merged
anjujha merged 6 commits intoNetflix:mainfrom
anjujha:anju/add-runs-endpoint
Apr 7, 2026
Merged

Endpoint to get a summary of runs for a given workflow instance#199
anjujha merged 6 commits intoNetflix:mainfrom
anjujha:anju/add-runs-endpoint

Conversation

@anjujha
Copy link
Copy Markdown
Collaborator

@anjujha anjujha commented Mar 30, 2026

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew build --write-locks to refresh dependencies)
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

This PR adds support to get a summary of all the runs for a given workflow instance

  1. Ran ./gradlew spotlessApply and ./gradlew build and verified it completes successfully
  2. Verified locally by:
    • Launch maestro-server locally (./gradlew :maestro-server:bootRun)
    • Create sample workflow, trigger a run and restart it 5x
    • Tested GET /api/v3/workflows/{workflowId}/instances/{instanceId}/runs against an instance with 5 runs:
      1. ?first=10 returns all 5 runs in descending order (run 5 → 1), total_count=5, has_next_page=false
      2. ?first=2 returns runs [5, 4], has_next_page=true, has_previous_page=false
      3. ?first=2&cursor=4 returns runs [3, 2], has_next_page=true, has_previous_page=true
      4. ?first=2&cursor=2 returns run [1], has_next_page=false, has_previous_page=true

Pagination cursors, total_count, start_index, and has_next/has_previous_page flags all behave correctly.

@anjujha anjujha force-pushed the anju/add-runs-endpoint branch 2 times, most recently from 47080b8 to a7979aa Compare March 30, 2026 20:37
@anjujha anjujha marked this pull request as ready for review March 30, 2026 20:55
@anjujha anjujha force-pushed the anju/add-runs-endpoint branch from 8b51d6b to 2f6e43c Compare March 30, 2026 21:12
Copy link
Copy Markdown
Collaborator

@rdeepak2002 rdeepak2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one last comment, otherwise looks good

@anjujha anjujha force-pushed the anju/add-runs-endpoint branch from 699fc41 to 5cb7d57 Compare April 7, 2026 22:01
@anjujha anjujha force-pushed the anju/add-runs-endpoint branch from 52718b6 to b4ed212 Compare April 7, 2026 22:45
@anjujha anjujha merged commit f5155e9 into Netflix:main Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants